package pack1;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class sprg28 {
	
	public static void main(String[] args) {
		
	
FirefoxProfile profile=new FirefoxProfile();
profile.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip");
profile.setPreference("browser.download.folderList", 2);
profile.setPreference("browser.download.dir", "d://");

WebDriver driver=new FirefoxDriver(profile);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

driver.get("http://docs.seleniumhq.org/download/");
System.out.println("step3");
driver.findElement(By.xpath("//tr[td[text()='Java']]/td[4]/a")).click();
System.out.println("step4");
	}
	
}
